#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

AddBan( player )
{
	if( ! isDefined( level.banlist ) )
		level.banlist = [];
	level.banlist[ level.banlist.size ] = player getGuid();
}

CheckBan()
{
	for( i = 0; i <= level.banlist.size; i ++ )
		if( self getGuid() == level.banlist[ i ] )
			Kick( self getEntityNumber(), "Banned Noob" );
}

AlivePlayersNumber()
{
	aplayers = 0;
	for ( i = 0; i < level.players.size; i++ )
		if ( level.players[i].health > 0 )
			aplayers ++;
	return aplayers;
}

isServerFull()
{
	if ( level.players.size == getDvar( "sv_maxclients" ) )
		return true;
	return false;
}